import { app } from "@/main";
import config from "@/config";
export function InfoMsg(title: string = "提示", body: string = "提示"): void {
  app.config.globalProperties.$toast.add({
    severity: "info",
    summary: title,
    detail: body,
    life: config.MESSAGE_LIFETIME,
  });
}

export function ErrorMsg(
  body: string = "系统似乎出现了一点问题，请稍后再试！",
  title: string = "错误"
): void {
  app.config.globalProperties.$toast.add({
    severity: "error",
    summary: title,
    detail: body,
    life: config.MESSAGE_LIFETIME,
  });
}
